/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pytctbactcomp")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pytctbactcomp.findAll", query = "SELECT p FROM Pytctbactcomp p"),
    @NamedQuery(name = "Pytctbactcomp.findByPytctbactcompid", query = "SELECT p FROM Pytctbactcomp p WHERE p.pytctbactcompid = :pytctbactcompid"),
    @NamedQuery(name = "Pytctbactcomp.findByDescripcion", query = "SELECT p FROM Pytctbactcomp p WHERE p.descripcion = :descripcion"),
    @NamedQuery(name = "Pytctbactcomp.findByMeta", query = "SELECT p FROM Pytctbactcomp p WHERE p.meta = :meta"),
    @NamedQuery(name = "Pytctbactcomp.findByVerificacion", query = "SELECT p FROM Pytctbactcomp p WHERE p.verificacion = :verificacion"),
    @NamedQuery(name = "Pytctbactcomp.findBySupuestos", query = "SELECT p FROM Pytctbactcomp p WHERE p.supuestos = :supuestos"),
    @NamedQuery(name = "Pytctbactcomp.findByDocumref", query = "SELECT p FROM Pytctbactcomp p WHERE p.documref = :documref"),
    @NamedQuery(name = "Pytctbactcomp.findByFecharegistro", query = "SELECT p FROM Pytctbactcomp p WHERE p.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Pytctbactcomp.findByObservaciones", query = "SELECT p FROM Pytctbactcomp p WHERE p.observaciones = :observaciones")})
public class Pytctbactcomp implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pytctbactcompid")
    private Integer pytctbactcompid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 500)
    @Column(name = "descripcion")
    private String descripcion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 500)
    @Column(name = "meta")
    private String meta;
    @Size(max = 500)
    @Column(name = "verificacion")
    private String verificacion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 500)
    @Column(name = "supuestos")
    private String supuestos;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 501)
    @Column(name = "documref")
    private String documref;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactcompid")
    private Collection<Pydgtbregfoto> pydgtbregfotoCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactcompid")
    private Collection<Sciftbactcont> sciftbactcontCollection;
    @JoinColumn(name = "pytctbcomponid", referencedColumnName = "pytctbcomponid")
    @ManyToOne(optional = false)
    private Pytctbcompon pytctbcomponid;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactcompid")
    private Collection<Pydgtbproydoc> pydgtbproydocCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactcompid")
    private Collection<Pyfntbactcreq> pyfntbactcreqCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactcompid")
    private Collection<Sciftbactplan> sciftbactplanCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "pytctbactompid")
    private Collection<Pytctbactmesp> pytctbactmespCollection;

    public Pytctbactcomp() {
    }

    public Pytctbactcomp(Integer pytctbactcompid) {
        this.pytctbactcompid = pytctbactcompid;
    }

    public Pytctbactcomp(Integer pytctbactcompid, String descripcion, String meta, String supuestos, String documref, Date fecharegistro, String observaciones) {
        this.pytctbactcompid = pytctbactcompid;
        this.descripcion = descripcion;
        this.meta = meta;
        this.supuestos = supuestos;
        this.documref = documref;
        this.fecharegistro = fecharegistro;
        this.observaciones = observaciones;
    }

    public Integer getPytctbactcompid() {
        return pytctbactcompid;
    }

    public void setPytctbactcompid(Integer pytctbactcompid) {
        this.pytctbactcompid = pytctbactcompid;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getMeta() {
        return meta;
    }

    public void setMeta(String meta) {
        this.meta = meta;
    }

    public String getVerificacion() {
        return verificacion;
    }

    public void setVerificacion(String verificacion) {
        this.verificacion = verificacion;
    }

    public String getSupuestos() {
        return supuestos;
    }

    public void setSupuestos(String supuestos) {
        this.supuestos = supuestos;
    }

    public String getDocumref() {
        return documref;
    }

    public void setDocumref(String documref) {
        this.documref = documref;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    @XmlTransient
    public Collection<Pydgtbregfoto> getPydgtbregfotoCollection() {
        return pydgtbregfotoCollection;
    }

    public void setPydgtbregfotoCollection(Collection<Pydgtbregfoto> pydgtbregfotoCollection) {
        this.pydgtbregfotoCollection = pydgtbregfotoCollection;
    }

    @XmlTransient
    public Collection<Sciftbactcont> getSciftbactcontCollection() {
        return sciftbactcontCollection;
    }

    public void setSciftbactcontCollection(Collection<Sciftbactcont> sciftbactcontCollection) {
        this.sciftbactcontCollection = sciftbactcontCollection;
    }

    public Pytctbcompon getPytctbcomponid() {
        return pytctbcomponid;
    }

    public void setPytctbcomponid(Pytctbcompon pytctbcomponid) {
        this.pytctbcomponid = pytctbcomponid;
    }

    @XmlTransient
    public Collection<Pydgtbproydoc> getPydgtbproydocCollection() {
        return pydgtbproydocCollection;
    }

    public void setPydgtbproydocCollection(Collection<Pydgtbproydoc> pydgtbproydocCollection) {
        this.pydgtbproydocCollection = pydgtbproydocCollection;
    }

    @XmlTransient
    public Collection<Pyfntbactcreq> getPyfntbactcreqCollection() {
        return pyfntbactcreqCollection;
    }

    public void setPyfntbactcreqCollection(Collection<Pyfntbactcreq> pyfntbactcreqCollection) {
        this.pyfntbactcreqCollection = pyfntbactcreqCollection;
    }

    @XmlTransient
    public Collection<Sciftbactplan> getSciftbactplanCollection() {
        return sciftbactplanCollection;
    }

    public void setSciftbactplanCollection(Collection<Sciftbactplan> sciftbactplanCollection) {
        this.sciftbactplanCollection = sciftbactplanCollection;
    }

    @XmlTransient
    public Collection<Pytctbactmesp> getPytctbactmespCollection() {
        return pytctbactmespCollection;
    }

    public void setPytctbactmespCollection(Collection<Pytctbactmesp> pytctbactmespCollection) {
        this.pytctbactmespCollection = pytctbactmespCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pytctbactcompid != null ? pytctbactcompid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pytctbactcomp)) {
            return false;
        }
        Pytctbactcomp other = (Pytctbactcomp) object;
        if ((this.pytctbactcompid == null && other.pytctbactcompid != null) || (this.pytctbactcompid != null && !this.pytctbactcompid.equals(other.pytctbactcompid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pytctbactcomp[ pytctbactcompid=" + pytctbactcompid + " ]";
    }
    
}
